<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<title>秦文票务</title>
		<?php
			echo $this->Html->css(array('jqmobile/default.min','jqmobile/style','jqmobile/jquery.mobile.structure-1.3.1.min'));
			echo $this->Html->script(array('jquery/jquery-1.8.2','jqmobile/jquery.mobile-1.3.1.min'));
		?>
		
	</head>
	<body>
		<!-- Home -->
		<div data-role="page" id="page1">
		    <div data-theme="a" data-role="header">
		        <p class="header"></p>
		    </div>
		    <div data-role="content">
		    	<h3 class="content-title" style = 'text-align:center'>秦文票务</h3>
		    	<p class="content-fg">
		    		<span class="content-fg-left"></span>
		    		<?php echo $this->Html->image('../css/jqmobile/fg.png')?>
		    		<span class="content-fg-right"></span>
		    	</p>
				<div class="content-text">
					<table width = 100%>
						<tr>
							<td colspan = 2>
							<?php echo $ticket['Ticket']['title']?>
							</td>
						</tr>
						<tr>
							<td>
							<?php 
		            			if($ticket['Ticket']['ViewPhoto']['id']){
		            				$pic = $ticket['Ticket']['ViewPhoto']['file_path'];
		            			}else{
		            				$pic = 'default/gmimg.jpg';
		            			}
		            			echo $this->Html->image($pic,array(
										'width'=>'100%',
										'title'=>$ticket['Ticket']['title'],
										'alt'=>$ticket['Ticket']['title']
								));
		            		?>
							</td>
							<td>
								演出时间:<?php echo $ticket['TicketPrice']['showtime']?><br/>
								场馆：<?php echo $ticket['Ticket']['Venue']['title_cn']?><br/>
								价格:<?php echo $ticket['UserOrderList']['price_sigle']?><br/>
								数量:<?php echo $ticket['UserOrderList']['price_num']?><br/>
								总计:<?php echo $ticket['UserOrderList']['price_total']?><br/>
								<hr/>
								收票人：<?php echo $order['UserOrder']['address_receive']?><br/>
								联系电话：<?php echo $order['UserOrder']['address_phone']?><br/>
								地址：<?php echo $order['UserOrder']['address']?>
							</td>
						</tr>
					</table>				
				</div> 
				<p class="content-fg">
		    		<span class="content-fg-left"></span>
		    		<?php echo $this->Html->image('../css/jqmobile/fg.png')?>
		    		<span class="content-fg-right"></span>
		    	</p>
		    	 <?php if($ticket['UserOrderList']['state']==2):?>
		    	 	<?php 
						echo $this->Form->create('eticket',array('url'=>array('controller'=>'Index','action'=>'eticketpub',$hash)));
						echo $this->Form->input('auth',array('type'=>'password','label'=>false));
						echo $this->Form->end('兑换');
					?>
		    	 <?php else:?>
		    	 	<h1 style = 'text-align:center'>已兑换</h1>
		    	 <?php endif;?>
		    	<p class="content-fg">
		    		<span class="content-fg-left"></span>
		    		<?php echo $this->Html->image('../css/jqmobile/fg.png')?>
		    		<span class="content-fg-right"></span>
		    	</p>
		    </div>
		    <div data-theme="a" data-role="footer">
		        <p class="footer">
		        			        </p>
		    </div>
		</div>
	</body>
</html>